package com.bss.dao;

// Generated Nov 1, 2011 10:54:22 PM by Hibernate Tools 3.3.0.GA

import org.springframework.stereotype.Repository;

import com.andy.basics.Dao;
import com.bss.model.Room;
import com.bss.model.RoomBooking;

@Repository
public class RoomBookingDao extends Dao<RoomBooking> {

	@Override
	protected Class<RoomBooking> getModelClass() {
		return RoomBooking.class;
	}

	public RoomBooking findCurrent(Room room) {
		return this.find("room.id = " + room.getId() + " and checkOutDate is not null").get(0);
	}

}
